/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utilisateurs.modeles;

/**
 *
 * @author nahla
 */
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

@Entity
public class ImagesGroup implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
    @OneToOne
    private Image swatch;
    @OneToOne
    private Image small;
    @OneToOne
    private Image medium;
    @OneToOne
    private Image large;

    public ImagesGroup() { }

    public ImagesGroup(Image swatch, Image small, Image medium, Image large) {
        this.swatch = swatch;
        this.small = small;
        this.medium = medium;
        this.large = large;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Image getLarge() {
        return large;
    }

    public void setLarge(Image large) {
        this.large = large;
    }

    public Image getSwatch() {
        return swatch;
    }

    public void setSwatch(Image swatch) {
        this.swatch = swatch;
    }

    public Image getMedium() {
        return medium;
    }

    public void setMedium(Image medium) {
        this.medium = medium;
    }

    public Image getSmall() {
        return small;
    }

    public void setSmall(Image small) {
        this.small = small;
    }

    @Override
    public int hashCode() {
        return id;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ImagesGroup)) {
            return false;
        }
        ImagesGroup other = (ImagesGroup) object;
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.GroupeImages[id=" + id + "]";
    }
}